package com.learning.spring.cloud.alibaba.feign.user.web.controller;

import com.learning.spring.cloud.alibaba.feign.user.web.service.OrderFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName: UserController
 * Description:
 * Date: 2021/7/25 23:03 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Slf4j
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    OrderFeignService orderFeignService;

    /**
     * @param id
     * @return
     */
    @GetMapping("/query/{id}")
    public List<String> queryOrderByUserId(@PathVariable("id") Long id) {
        return orderFeignService.queryOrderByUserId(id);
    }
}
